<!DOCTYPE html>
<html>
<head>
    <title>差旅报销</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <a class="btn btn-primary" @click="query">&nbsp;查询</a>
            #if($shiro.hasPermission("clbx:save"))
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            #end
            #if($shiro.hasPermission("clbx:update"))
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            #end
            #if($shiro.hasPermission("clbx:delete"))
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            #end
            #if($shiro.hasPermission("clbx:list"))
            <a class="btn btn-primary" @click="querydet">&nbsp;查看明细</a>
            #if($shiro.hasPermission("clbx:submit"))
            <a class="btn btn-primary" @click="submit"><i class="fa fa-pencil-square-o"></i>&nbsp;提交</a>
            #end
            #if($shiro.hasPermission("clbx:processInt"))
            <a class="btn btn-primary" @click="processInt"><i class="fa fa-pencil-square-o"></i>&nbsp;审批</a>
            #end
            #if($shiro.hasPermission("clbx:popHistory"))
            <a class="btn btn-primary" @click="popHistory"><i class="fa fa-pencil-square-o"></i>&nbsp;审批历史记录</a>
            #end
            <a class="btn btn-primary" @click="queryfile"></i>&nbsp;查看附件</a>
            #end

        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList&&!showtable" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-1 control-label">报销人群</div>
                <div class="col-sm-11">
                    <input type="text" v-model="clbx.peopleno" readonly="readonly" hidden="true"/>
                    <textarea rows="1" cols="20" class="form-control" v-model="clbx.bxrqs" style="resize: none;"
                              readonly="readonly" @click="selectuser"/></textarea>
                </div>

            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">部门名称</div>
                <div class="col-sm-11">
                    <textarea rows="3" cols="20" class="form-control" v-model="clbx.deptName" style="resize: none;"
                              readonly="readonly"/></textarea>
                </div>
            </div>
            <hr style="height:1px;border:none;border-top:1px solid #555555;"/>
            <div class="form-group">
                <div class="col-sm-1 control-label">职级</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.zj" placeholder="职级"/>
                </div>
                <div class="col-sm-1 control-label">计划天数</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.jhts" placeholder="计划天数"/>
                </div>
                <div class="col-sm-1 control-label">实际天数</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.sjts" placeholder="实际天数"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">交通费用小计</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.jtfyxj" placeholder="交通费用小计" readonly="readonly"/>
                </div>
                <div class="col-sm-1 control-label">其他费用小计</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.qtfyxj" placeholder="其他费用小计" readonly="readonly"/>
                </div>
                <div class="col-sm-1 control-label">预支金额</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.yzje" placeholder="预支金额"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-1 control-label">核销金额</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.hxje" placeholder="核销金额" readonly="readonly"/>
                </div>
                <div class="col-sm-1 control-label">退补金额</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.tbje" placeholder="退补金额" readonly="readonly"/>
                </div>
                <div class="col-sm-1 control-label">结算点</div>
                <div class="col-sm-2">
                    <select v-model="clbx.settlementpoint" class="form-control">
                        <option v-for="setlever in setlever" :value="setlever.value">{{setlever.label}}</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-1 control-label">出差事由</div>
                <div class="col-sm-5">
                    <textarea rows="3" cols="20" class="form-control" v-model="clbx.ccsy" placeholder="出差事由"
                              style="resize: none;"/></textarea>
                </div>
                <div class="col-sm-1 control-label">备注</div>
                <div class="col-sm-5">
                    <textarea rows="3" cols="20" class="form-control" v-model="clbx.bz" placeholder="备注"
                              style="resize: none;"/></textarea>
                </div>
            </div>
            <hr style="height:1px;border:none;border-top:1px solid #555555;"/>
            <div class="form-group">
                <div class="col-sm-1 control-label">住宿包干报销:标准</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.zsbgbxBz" placeholder="标准"/>
                </div>
                <div class="col-sm-1 control-label">计算天数</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.zsbgbxJsts" placeholder="计算天数"/>
                </div>
                <div class="col-sm-1 control-label">核报金额</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.zsbgbxHbje" placeholder="核报金额"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-1 control-label">住宿限额报销:标准</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.zsxebxBz" placeholder="标准"/>
                </div>
                <div class="col-sm-1 control-label">计算天数</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.zsxebxJsts" placeholder="计算天数"/>
                </div>
                <div class="col-sm-1 control-label">核报金额</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.zsxebxHbje" placeholder="核报金额"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-1 control-label">伙食补助费:标准</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.hsbzfBz" placeholder="标准"/>
                </div>
                <div class="col-sm-1 control-label">计算天数</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.hsbzfJsts" placeholder="计算天数"/>
                </div>
                <div class="col-sm-1 control-label">核报金额</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.hsbzfHbje" placeholder="核报金额"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-1 control-label">市内交通费:标准</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.snjtfBz" placeholder="标准"/>
                </div>
                <div class="col-sm-1 control-label">计算天数</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.snjtfJsts" placeholder="计算天数"/>
                </div>
                <div class="col-sm-1 control-label">核报金额</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.snjtfHbje" placeholder="核报金额"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-1 control-label">车、船补助费:标准</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.ccbzfBz" placeholder="标准"/>
                </div>
                <div class="col-sm-1 control-label">计算天数</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.ccbzfJsts" placeholder="计算天数"/>
                </div>
                <div class="col-sm-1 control-label">核报金额</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.ccbzfHbje" placeholder="核报金额"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-1 control-label">其他杂支:标准</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.qtzzBz" placeholder="标准"/>
                </div>
                <div class="col-sm-1 control-label">计算天数</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.qtzzJsts" placeholder="计算天数"/>
                </div>
                <div class="col-sm-1 control-label">核报金额</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" v-model="clbx.qtzzHbje" placeholder="核报金额"/>
                </div>
            </div>

            <div class="form-group">
                <div class="panel panel-default">
                    <div class="panel-heading">报销明细</div>

                    <input type="button" class="btn btn-primary" @click="addCertificateItem" value="增加">
                    <template v-for="(clbxDet, index) in clbxDetList ">
                        <hr style="height:1px;border:none;border-top:1px solid #555555;"/>
                        <div class="form-group">
                            <div class="col-sm-1 control-label">出发地</div>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" v-model="clbxDet.cfd" placeholder="出发地"/>
                            </div>
                            <div class="col-sm-1 control-label">抵达地</div>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" v-model="clbxDet.ddd" placeholder="抵达地"/>
                            </div>
                            <div class="col-sm-1 control-label">出发日期</div>
                            <div class="col-sm-2">
                                <el-date-picker v-model="clbxDet.cfDate" type="date" placeholder="出发日期"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-1 control-label">交通类别</div>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" v-model="clbxDet.jtlb" placeholder="交通类别"/>
                            </div>
                            <div class="col-sm-1 control-label">金额</div>
                            <div class="col-sm-2">
                                <input type="text" class="form-control" v-model="clbxDet.je" placeholder="金额"/>
                            </div>
                            <input type="button" class="btn btn-del" @click="delCertificateItem(index)" value="删除">
                        </div>

                    </template>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>

    <div v-show="showtable" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">审批意见</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="clbx.remark" placeholder="审批意见"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="process" value="批准"/>
                <input type="button" class="btn btn-primary" @click="reject" value="拒绝"/>
                <input type="button" class="btn btn-primary" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
    <!--用户明细-->
    <div id="windowuser" hidden="true">
        <div class="grid-btn">
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="quser.userdesc" placeholder="用户名">
            </div>
            <a class="btn btn-default" @click="queryuser">查询</a>
            <a class="btn btn-primary" @click="adduser">添加</a>
            <a class="btn btn-primary" @click="clearuser">全部清除</a>
        </div>
        <table id="jqGridTableuser"></table>
    </div>
    <!--用户明细-->
</div>

<!-- 弹出历史记录 -->
<div id="popHistory" style="display: none;padding:10px;">
    <table id="popHistoryGrid"></table>
    <div id="popHistoryGridPager"></div>
</div>
<!--报销明细弹窗开始-->
<div id="window" hidden="true">
    <table id="jqGridTable"></table>
</div>
<!--报销明细弹窗结束-->

<script src="${rc.contextPath}/js/workflow/clbx.js?_${date.systemTime}"></script>
</body>
</html>